#! /bin/sh -  
export SERVER=./target/demo-0.0.1-SNAPSHOT.jar
P_ID=`ps -ef | grep -w $SERVER | grep -v "grep" | awk '{print $2}'`
if [ -z $P_ID ]; then
       echo "===SERVER process not exists or stop success"
     else
       kill -9 $P_ID
       echo "SERVER killed success"
fi

nohup java -jar -Xms128m -Xmx256m $SERVER >/dev/null 2>&1 &
